import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
import {state1,mutations1,getters1,actions1} from '../project1/store/store'
import {state0,mutations0,getters0,actions0} from '../center/store/store'
import {state3,mutations3,getters3,actions3} from '../project3/store/store'
const state = {
    ...state1,
    ...state0,
    ...state3,
    userInfo:JSON.parse(sessionStorage.getItem('userInfo')) || "",
    
}

const getters = {

}

const mutations = {
    ...mutations1,
    ...mutations0,
    ...mutations3,
    getUserInfo(state,list){
        state.userInfo = JSON.parse(list)
        sessionStorage.setItem('userInfo',list)
    }
    
}

const actions = {

}
export function createStore() {
    return new Vuex.Store({
        state,
        actions,
        mutations,
        getters,
        modules: []
    })
}